<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org"
	  xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity5">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
		<meta name="description" content="">
		<meta name="author" content="">
		<title>SQL语句练习系统</title>
		<!-- Bootstrap core CSS -->
		<link href="asserts/css/bootstrap.min.css"  rel="stylesheet">
		<!-- Custom styles for this template -->
		<link href="asserts/css/signin.css"  rel="stylesheet">

	</head>
<body class="text-center">
<div class="container">
	<div class="row clearfix">
		<div class="col-md-12 column">
			<h3 class="text-center">
				SQL语句训练系统
			</h3>
		</div>
	</div><div sec:authorize="!isAuthenticated()">
	<h4 align="center">您好，请先登录<a th:href="@{/login}">请登录</a></h4>
    </div>
	<div  sec:authorize="hasRole('ROLE_学生')"  class="row clearfix">
		<div class="col-md-12 column">
			<a class="btn btn-lg btn-link btn-block" th:href="@{/student/list}">学生端页面 </a>
		</div>
	</div>
	<div sec:authorize="hasRole('ROLE_老师')" class="row clearfix">
		<div class="col-md-12 column">
			<a class="btn btn-lg btn-link btn-block" th:href="@{/teacher/1}">教师端页面</a>
		</div>
	</div>
	<div sec:authorize="isAuthenticated()" >
		<h5><span  sec:authentication="name"></span>您好,您的角色是<span sec:authentication="principal.authorities"></span>,欢迎来到sql训练系统</h5>
		<form th:action="@{/logout}" method="post">
			<input type="submit" value="注销">
		</form>

	</div>
</div>
</body>

</html>
<style>
	/* 整个网页的高度宽度100% 内边距 外边距同时去掉 */
	html,body{
		width: 100%;
		height: 100%;
		padding: 0;
		margin: 0;
		background: url('../asserts/png/BG.png') center center no-repeat;
	}
	.sr-only,.form-control{
		margin-bottom: 20px;
	}
</style>